fix: InScenePlaced edge cases#4073
Merged
Merged
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
6 tasks
EmandM
commented
Jul 14, 2026
EmandM
commented
Jul 14, 2026
* fix - Adjusted the `InScenePlaced` property to internally set or publicly get the serialized `m_InScenePlaced` field. - `NetworkObject` now implements `ISerializationCallbackReceiver` to assure `m_InScenePlaced` is always properly set for in-scene placed objects. - Removed legacy define for UNITY_2021_2_OR_NEWER since v2.x.x+ is only for Unity v6. * test - Adding `NetworkSceneManagerStartupTests` which validates this PR. - Adding the assets and script needed to validate this PR. - Updated scenes in build list to include the new scene: InSceneNetworkObjectMovesToDDOL. * update Adding change log entry. * fix Fixing issue with marking things as in-scene placed during runtime. * update Commenting out the addressable scene test. Adding back the check for InScenePlaced when shutting down. * revert and update - `ISerializationCallbackReceiver` implementation as that does not accomplish what we need. - Setting InScenePlaced within OnValidate instead. * fix Only reset things that have been spawned are in-scene placed, and is assigned to the relative NetworkManager (for integration testing purposes) * update Removing the addressable scene. We will revisit this when this is supported. * fix and style Fixing several issues with NetworkObjectSceneMigrationTests. Fixing several formatting issues. * style brackets adjustment. * style Adding white spaces between foreach and if * style Fixing some out of alignment if statements. * style Didn't save the change... adding last standards check issue fix. * fix Fixing issue where we were sending scene migration notifications when migrating into the DDOL. Fixing issue where if a client detected a changed scene but had no scene change to send (later) it would throw and exception and cause a memory leak. * update Remove the legacy multiprocess scene that is no longer used and has references to scripts that no longer exist. * fix Issue where distributed authority would throw an exception during scene migration due to the fact that we would throw an exception if the 1st scene in the scene migration table didn't contain the client that has authority over the NetworkObject that migrated into a new scene. Now we count how many entries were written and if that count is zero upon parsing known loaded scenes then it throws an exception. Reverting the exclusion of DDOL synchronization (that was a red herring). * test - fix Removing the ValidateSceneOnAllClients portion as that doesn't assure that all clients have loaded the scene and fully synchronized the scene which could lead to edge case issues during this test. * update Adding and updating the change log entries for this PR.
NoelStephensUnity
approved these changes
Jul 15, 2026
NoelStephensUnity
left a comment
Member
There was a problem hiding this comment.
Everything should pass with the combined fixes.
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
Fixes handling of edge cases around InScenePlaced value.
Jira ticket
UUM-146506
fixes: #4049
Changelog
Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Backports
n/a